import os

from django.test import TestCase

# Create your tests here.
import django

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.dev_settings")
django.setup()

from contract.models import ContractDetail, Contract, SaleContractDetail

q = ContractDetail.objects.get(id=3)
q = SaleContractDetail.objects.filter(contract_id='1', arrived_at_now__isnull=True, contract__supplier__name=True,)
#q = Contract.objects.filter(supplier__name=)
print(q.__dict__)
q.name = '修改焦煤2'
q.save()


